<table class="col-lg-12 table col-md-12 col-sm-12 col-xs-12 no-padding">
    <thead>
    <tr class="x8-16-b">
        <td class="col-lg-4"><?php echo $this->lang->line("Project Name")?></td>
        <td class="col-lg-2"><?php echo $this->lang->line("Num bid")?></td>
        <td class="col-lg-2"><?php echo $this->lang->line("Created")?></td>
        <td class="col-lg-2"><?php echo $this->lang->line("Status")?></td>
        <td class="col-lg-2"><?php echo $this->lang->line('Options'); ?></td>
    </tr>
    </thead>
    <tbody>
    <?php
    if ($myProjects -> num_rows() > 0) {

        foreach ($myProjects->result() as $project) {
            ?>
            <tr class="x8-15">
                <td class="xanh-16-b"><a style="font-size:18px;" href="<?php echo site_url('project/view/'.$project->id)?>"><?php echo $project->project_name; ?></a>
                </td>
                <td style="font-style: italic"><?php echo $numbids = getNumBid($project->id)?></td>

                <td><?php
                    if(date("d/m/y") == date("d/m/y",$project->created))
                        echo "Hôm nay";
                    else
                        echo date("d/m/y", $project->created);?></td>
                <td><?php //echo $project->budget_min?> <?php echo getProjectStatus($project->project_status)?></td>
                <td>
                    <div id="loading-image" style="display: none">
                        <img src="<?php echo image_url('loading.gif') ?>"/>
                    </div>
                	<?php 
					  if($numbids != 0 && ($project->project_status == 0 || $project->project_status == 1) || $project->flag==1 ){ 
                        if($project->project_status != 3){

                    ?>
                        <a href="<?php echo site_url('project/pickProvider/'.$project->id);?>"><?php echo $this->lang->line('Pick provider');?></a>
                    <?php
                        }else if($project->project_status == 3){
                    ?>
                        <a class="restore_project" data-pid = "<?php echo $project->id?>" href="#"> <?php echo $this->lang->line('Restore');?> </a> 
                    <?php
                        }
					?>
					  
					  
					  <?php } 
					  if($project->project_status == 0 && $project->flag ==1 )
					  { ?>
						 <a class="delete_project" data-pid = "<?php echo $project->id?>" href="#"> <?php echo $this->lang->line('Cancel');?> </a>  <?php 
					  }
					  if($project->project_status == 0 && $project->flag ==0 )
					  { ?>
						 <a id="delete_project" data-pid = "<?php echo $project->id?>" href="#"> <?php echo $this->lang->line('Cancel');?> </a>  <?php 
					  }
					  if($project->flag ==0){
					  ?>
					  
					  <a href="<?php echo site_url('project/extendBid/'.$project->id);?>"><?php echo $this->lang->line('Extend');?></a>
					  <?php } ?>

                </td>
            </tr>
        <?php
        }
    }
    ?>
    </tbody>
</table>